com.highdeal.pnr.hci
Class RecurringRateModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateModel
      extended by com.highdeal.refilllogic.hci.RefillRecurringRateModel
          extended by com.highdeal.pnr.hci.RecurringRateModel
All Implemented Interfaces:
IXMLMarshallable, XMLMarshallable, ContextualNode

public class RecurringRateModel
extends com.highdeal.refilllogic.hci.RefillRecurringRateModel

This Java class represents a recurring rate.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="recurring">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="component" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
     <xs:attribute name="propagatedEvent" type="xs:boolean" default="false"/>
     <xs:attribute name="frequency" type="xs:string"/>
     <xs:attribute name="prepaid" type="xs:boolean" default="false"/>
     <xs:attribute name="prepaidPeriods" type="xs:decimal"/>
     <xs:attribute name="prorata" type="xs:boolean" default="false"/>
     <xs:attribute name="timeUnit" type="xs:decimal"/>
     <xs:attribute name="roundingMode" type="xs:decimal"/>
     <xs:attribute name="roundingStep" type="xs:decimal"/>
     <xs:attribute name="fraction" type="xs:decimal"/>
     <xs:attribute name="splitRefund" type="xs:boolean" default="false"/>
     <xs:attribute name="birthdayPropertyName" type="xs:string" default="default.agreement_creation_date"/>
     <xs:attribute name="name" type="xs:string"/>
     <xs:attribute name="description" type="xs:string"/>
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String TAG_NAME
          The XML tag name of this data model: recurring.
 
Constructor Summary
RecurringRateModel()
          Creates a RecurringRateModel with Birthday Date set to default property of agreement creation date.
 
Method Summary
 boolean checkValidity()
          Returns true if the recurring rate is valid.
 RatingContextDescription getContext(ContextualNode child)
          Gets the context for the specified child.
 int getPrepaidPeriods()
          Gets the prepaid periods count.
 ProrataModel getProrata()
          Gets the prorata model.
protected  java.lang.String getTagName()
           
 boolean isPrepaid()
          Tests if the recurring rate is prepaid.
 boolean isProratable()
          Tests if the recurring rate is proratable.
protected  void marshallAttributes(XMLOutputter output)
           
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setPrepaid(boolean prepaid)
          Sets the prepaid flag.
 void setPrepaidPeriods(int periods)
          Sets the prepaid periods count.
 void setProrata(ProrataModel p)
          Sets the prorata model.
 void setProratable(boolean proratable)
          Sets the proratable flag.
 
Methods inherited from class com.highdeal.refilllogic.hci.RefillRecurringRateModel
getBirthdayPropertyName, getFrequency, isPropagatedEvent, marshal, setBirthdayPropertyName, setFrequency, setPropagatedEvent
 
Methods inherited from class com.highdeal.pnr.hci.RateModel
addCharacterData, addChild, getDescription, getName, getParent, getRateComponent, inheritedContext, marshalAttributes, marshalChildren, remove, setDescription, setName, setParent, setRateComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag name of this data model: recurring.

See Also:
Constant Field Values
Constructor Detail

RecurringRateModel

public RecurringRateModel()
Creates a RecurringRateModel with Birthday Date set to default property of agreement creation date.

Method Detail

setPrepaid

public void setPrepaid(boolean prepaid)
Sets the prepaid flag.

Parameters:
prepaid - true if prepaid, false otherwise

isPrepaid

public boolean isPrepaid()
Tests if the recurring rate is prepaid.

Returns:
true if prepaid, false otherwise

getPrepaidPeriods

public int getPrepaidPeriods()
Gets the prepaid periods count.

Returns:
The prepaid periods count

setPrepaidPeriods

public void setPrepaidPeriods(int periods)
Sets the prepaid periods count.

Parameters:
periods - The prepaid periods count

setProratable

public void setProratable(boolean proratable)
Sets the proratable flag.

Parameters:
proratable - true if proratable, false otherwise

isProratable

public boolean isProratable()
Tests if the recurring rate is proratable.

Returns:
true if proratable, false otherwise

setProrata

public void setProrata(ProrataModel p)
Sets the prorata model.

Parameters:
p - The prorata model

getProrata

public ProrataModel getProrata()
Gets the prorata model.

Returns:
The prorata model

checkValidity

public boolean checkValidity()
Returns true if the recurring rate is valid. Recurring rate is valid if all the following conditions are met:

Overrides:
checkValidity in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
Returns:
true if the rate is valid, false otherwise

getContext

public RatingContextDescription getContext(ContextualNode child)
Gets the context for the specified child.

Specified by:
getContext in interface ContextualNode
Overrides:
getContext in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
Parameters:
child - The child node
Returns:
The context

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Overrides:
setAttributes in class com.highdeal.refilllogic.hci.RefillRecurringRateModel
Parameters:
atts - The XML attributes of the current element

marshallAttributes

protected void marshallAttributes(XMLOutputter output)
Overrides:
marshallAttributes in class com.highdeal.refilllogic.hci.RefillRecurringRateModel

getTagName

protected java.lang.String getTagName()
Overrides:
getTagName in class com.highdeal.refilllogic.hci.RefillRecurringRateModel

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)